#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * Sockes Client/Connection Collection Class
 *      Provides a custom collection implementation for storing ISocketConnection instances.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"

using namespace System;
using namespace Adaptive;
using namespace Adaptive::Foundation;

namespace Adaptive
{
	namespace Network
	{
		namespace Sockets
		{
			/// <summary>
			/// Provides a custom collection implementation for storing <see cref="ISocketConnection"/> instances.
			/// </summary>
			public ref class SocketsConnectionCollection : public GenericCollectionBase<ISocketConnection^>
			{
			public:
				/*------------------------------------------------------------------------
				 * Constructor / Dispose / Destructor Methods
				 *----------------------------------------------------------------------*/
				#pragma region Constructor / Dispose / Destructor Methods
				/// <summary>
				/// Initializes a new instance of the class
				/// </summary>
				/// <remarks>
				/// This is the default constructor.
				/// </remarks>
				SocketsConnectionCollection();

			protected:
				/*------------------------------------------------------------------------
		         * Protected Methods / Functions
				 *----------------------------------------------------------------------*/
				#pragma region Protected Methods / Functions
				/// <summary>
				/// Gets the unique key for the specified object instance used to identfy the item in the collection.
				/// </summary>
				/// <param name="itemToGetKeyFor">The ISocketConnection instance being appended to the collection.</param>
				/// <returns>
				/// A string value used to identify the object instance.
				/// </returns>
				virtual String^ GetKeyForObject(ISocketConnection^ itemToGetKeyFor) override;
				#pragma endregion
			};
		}
	}
}
